let buffer01=Buffer.from([97,98,99]);//创建一个Buffer对象
console.log(buffer01);//<Buffer 61 62 63>这种方式我们看不懂
let str=buffer01.toString();//十六进制看不懂，转换成二进制
console.log(str);//abc
console.log(typeof(str));//String


let buffer02=Buffer.from("nodejs");
console.log(buffer02);//<Buffer 6e 6f 64 65 6a 73>
let str2=buffer02.toString();
console.log(str2);//nodejs


let buf3=Buffer.alloc(10);//创建一个存放10个字符的Buffer对象
buf3.write("abc");//往Buffer里存入信息(转二进制再转16进制存起来)
console.log(buf3);//<Buffer 61 62 63 00 00 00 00 00 00 00>
console.log(buf3.toString());//abc